import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm';

import { ApiProperty } from '@nestjs/swagger';
import { BaseEntity } from '../base.entity';

@Entity({ name: 'sys_pages' })
export default class SysPages extends BaseEntity {
  @PrimaryGeneratedColumn()
  @ApiProperty()
  id: number;

  @ApiProperty()
  @Column()
  key: string;

  @ApiProperty()
  @Column()
  name: string;

  @ApiProperty()
  @Column()
  images: string;

  @ApiProperty()
  @Column()
  desc: string;

  @ApiProperty()
  @Column()
  content: string;

  @ApiProperty()
  @Column()
  draft: string;

  @ApiProperty()
  @Column({ name: 'project_id' })
  projectId: number;

  @ApiProperty()
  @Column()
  status: number;

  @ApiProperty()
  @Column()
  featured: number;

  @ApiProperty()
  @Column({ comment: '页面类型，默认0，普通页面；1，flutter 页面' })
  type: number;

  @ApiProperty()
  @Column()
  visibilitylevel: number;

  @ApiProperty()
  @Column({ type: 'bigint' })
  fork: number;
}
